<!DOCTYPE html>
<html>
<head>	
	<title>{:C('SERVER_HOME_NAME')}</title>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css" /> 		
	<link rel="stylesheet" href="__PUBLIC__/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="__PUBLIC__/kindeditor/plugins/code/prettify.css" />
				

</head>
<style type="text/css">
	.newsType{

		color:#000;

	}
	.hide{
		display: none;
	}
.main table td{
		width: 40px;
	}

</style>
<body>
	<div class="box">
	<include file="Public/top" />

		<div class="content">
			<include file="newsLeft" />
			<div class="main p30">
				<form action="__URL__/addPackageOrder.html" method="post" onSubmit="return beforeSubmit(this);" enctype="multipart/form-data"
>
					<table style="width:100%;">
						<tbody>
							<tr class="tbs-btn">
								<td>类型：</td>
								<td><span ><a class="newsType" href="__URL__/newsRelease.html">自选投稿</a></span>
								<span class="cur"><a class="newsType" href="__URL__/newsPackage.html">新闻套餐</a></span></td>
							</tr>
							
							<tr class="tbs-btn">
								<td>套餐：</td>
								<td>
									<div class="package">
										<div class="package-choose">
											<volist name="packageList" id="vo">
												<span data-id="{$vo.id}" data-price="{$vo.price}">{$vo.package_name}({$vo.price}币)</span>
												<ul class="hide" data-id="{$vo.id}">
													<volist name="vo.package_content" id="do">
														<li>{$do.news_name}</li>
													</volist>
												</ul>
											</volist>	
										</div>
										<div class="package-main">

										<ul id="newsList">

													
										</ul>

											
										</div>
									</div>
									<input type="hidden" name="news_ids">
									<input type="hidden" name="order_price">
								</td>
							</tr>
							<tr>
								<td>标题：</td>
								<td class="subject"><span><input type="text" name="news_title" placeholder="请输入主题"></span></td>
							</tr>
							<tr>
								<td>内容：</td>
								<td><div id="page"><textarea id="kind" name="news_content" style="width:800px;height:400px;"></textarea></div></td>
							</tr>
						</tbody>		
					</table>
					<div class="btn-form"><input class="btn m400" type="submit" value="发布"><a href="#" class="btn m40">导入代写</a></div>
				</form>
			</div>
			
		</div>
	</div>
	<include file="Public/ok" />
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.min.js"></script>
	<script src="__PUBLIC__/js/page.js"></script>
	<script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor-all.js"></script>
	<script charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh-CN.js"></script>
	<script charset="utf-8" src="__PUBLIC__/kindeditor/plugins/code/prettify.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('#kind', {
				cssPath : '__PUBLIC__/kindeditor/plugins/code/prettify.css',
				uploadJson : '__PUBLIC__/kindeditor/php/upload_json.php',
				fileManagerJson : '__PUBLIC__/kindeditor/php/file_manager_json.php',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
	<script type="text/javascript">
	$(document).ready(function(){
		 

			$(".package-choose span:first-child").addClass("cur");
			var data_id=$(".package-choose span:first-child").attr("data-id");
			var data_price=$(".package-choose span:first-child").attr("data-price");
			var packageInfo=$(".package-choose span:first-child").parent().find("ul[data-id='"+data_id+"']").html();
			$("#newsList").html(packageInfo);
			$("input[name=news_ids]").val(data_id);
			$("input[name=order_price]").val(data_price);

			$(".tbs-btn span").on("click",function () {
				var _this=$(this);
				_this.addClass("cur");
				_this.siblings().removeClass("cur");
				var data_id=_this.attr("data-id");
				var packageInfo=_this.parent().find("ul[data-id='"+data_id+"']").html();
				var data_price=_this.attr("data-price");
				$("#newsList").html(packageInfo);
				$("input[name=news_ids]").val(data_id);
				$("input[name=order_price]").val(data_price);
			});


		});



		

	</script>		
</body>
</html>